Repository navigation
Conversation
Add test coverage for DSSE (EnvelopeType.SIMPLE) across TrustedMetadataSet
and Updater components:
- In tests/test_trusted_metadata_set.py:
* Add full update workflow test with EnvelopeType.SIMPLE (loading root
from simple envelope, updating timestamp, snapshot, targets, and
delegated targets).
* Add error tests for expired metadata, untrusted/invalid signatures,
and unexpected payload types in simple envelopes.
* Resolve TODO regarding testing via trusted metadata set tests.
- In tests/test_updater_ng.py:
* Add end-to-end integration test verifying that Updater with
EnvelopeType.SIMPLE refreshes metadata from a repository serving
SimpleEnvelope formats and successfully downloads target files.
Closes theupdateframework#2565
Signed-off-by: saurav kumar <krsauvi@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds test coverage for Dead Simple Signing Envelopes (DSSE /
EnvelopeType.SIMPLE) across bothTrustedMetadataSetandUpdater, resolving #2565 and addressing the TODO intest_trusted_metadata_set.py.Changes Made
tests/test_trusted_metadata_set.py:test_update_simple_envelope()to verify the full update cycle (root, timestamp, snapshot, targets, and delegated targets) when usingEnvelopeType.SIMPLE.test_update_simple_envelope_expired(): verifiesExpiredMetadataError.test_update_simple_envelope_untrusted_signature(): verifiesUnsignedMetadataError.test_update_simple_envelope_unexpected_payload_type(): verifiesRepositoryError.test_load_from_simple_envelope.tests/test_updater_ng.py:test_refresh_simple_envelope(): an end-to-end integration test verifying that anUpdaterconfigured withUpdaterConfig(envelope_type=EnvelopeType.SIMPLE)successfully refreshes metadata from a repository servingSimpleEnvelopes and downloads target files.Verification
ruff checkandruff format: passed cleanly.mypy: passed with 0 issues.python -m unittest discover tests: all 213 unit tests passed.Fixes #2565.